package com.crayon.cardbiz.entry;

import java.util.Arrays;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.ListFragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.crayon.cardbiz.R;
import com.crayon.cardbiz.fragment.FragmentRoot;

abstract public class FragmentChildComm extends FragmentRoot {

	abstract public Fragment getMainChildFragment();

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		//		return super.onCreateView(inflater, container, savedInstanceState);
		return inflater.inflate(R.layout.fragment_child_common, container, false);
	}
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);

		if(getChildFragmentManager().findFragmentById(R.id.content_frame)==null){
			FragmentTransaction ft = getChildFragmentManager().beginTransaction();
			ft.add(R.id.content_frame,getMainChildFragment());
			ft.commit();
		}
	}


	@Override
	public String getTopTitle() {
		// TODO Auto-generated method stub
		return null;
	}
	
	
}

